<template>
  <div class="cartNavBar">
    <NavBar>
      <template v-slot:center>
        <div class="cartNavBar-center">
          购物车({{getLength}})
        </div>
      </template>
    </NavBar>
  </div>
</template>
<script>
import NavBar from "@/components/common/navbar/NavBar"
export default {
  name:"CartNav",
  components:{
    NavBar,
  },
  computed:{
    getLength:function(){
      return this.$store.state.cartList.length;
    }
  }
}
</script>
<style scoped>
.cartNavBar{
  background-color: #ff8198;
  
}
</style>